#pragma once
#include "hHuffmanDefine.h"

struct Huffman
{
	static void code(hBitStr& outData, const void* dt, size_t len);
	static void codeEx1(hBitStr& outData, const void* dt, size_t len);
	static void codeEx2(hBitStr& outData, const void* dt, size_t len);

	template <typename T>
	static void decode(T& outData, const hBitStr& dt) { _hHuffmanDetail::DecodeCallback{ dt }(outData); }
	template <typename T>
	static void decodeEx1(T& outData, const hBitStr& dt) { _hHuffmanDetail::DecodeEx1Callback{ dt }(outData); }
	template <typename T>
	static void decodeEx2(T& outData, const hBitStr& dt) { _hHuffmanDetail::DecodeEx2Callback{ dt }(outData); }
};